package com.xian.ucenter.entities;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 文章管理表
 * </p>
 *
 * @author xian
 * @since 2022/07/23 02:59
 */
@Data
@TableName("blog_post")
@ApiModel(value = "Post对象", description = "文章管理表")
public class Post implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty("作者")
    @TableField("auth_name")
    private String authName;

    @ApiModelProperty("作者")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty("文章标题")
    @TableField("title")
    private String title;

    @ApiModelProperty("文章内容")
    @TableField("content")
    private String content;

    @ApiModelProperty("文章浏览量")
    @TableField("views")
    private Long views;

    @ApiModelProperty("描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("封面")
    @TableField("cover")
    private String cover;

    @ApiModelProperty("发布，默认0, 0-发布, 1-草稿")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("删除，默认0, 1删除")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("修改时间")
    @TableField(value = "modify_time",fill = FieldFill.INSERT_UPDATE)
    private Date modifyTime;


}
